package com.lizhi.yun.db.stand.pojo;/**
 * @program: sfrobot-html
 * @name StandPtAprPOJO
 * @description: 主被动运动关联表
 * @author: lizhi
 * @create: 2020-04-24 14:38
 */

import com.lizhi.mybatis.boot.Description;
import lombok.Data;
import lombok.ToString;

import javax.persistence.*;

/**
 *@program: sfrobot-html
 *@name StandPtAprPOJO
 *@description: 处方运动记录
 *@author: lizhi
 *@create: 2020-04-24 14:38
 */
@Data
@ToString
@Entity
@Table(name = "stand_pre_apm")
@Description("处方运动记录")
public class StandPreApmPOJO {

    @Id
    @Column(length = 30)
    @Description("lid")
    public String lid;

    @Column(length = 30)
    @Description("运动记录id")
    private String paId;

    @Column(length = 30)
    @Description("处方id")
    private String preId;

    @Column(length = 30)
    @Description("处方记录Id")
    private String preActionId;

    @Column
    @Description("当前运动次数")
    private int paCurTm;

    @Column(length = 2)
    @Description("主被动标志(00-主动，01-被动)")
    private String paType;

    @Transient
    @Description("主被动标志")
    private String paTypeText;

    @Column(length = 500)
    @Description("左脚运动位置")
    private String paLeftAcPos;

    @Column(length = 500)
    @Description("右脚运动位置")
    private String paRightAcPos;

    @Column(length = 19)
    @Description("入表时间（YYYY-mm-dd HH:mm:ss）")
    private String paIstTm;


    /*云管需要的数据*/
    @Column(length = 200)
    @Description("医院ID")
    private String hospitalId;

    @Column(length = 200)
    @Description("系统ID")
    private String hospitalSystemId;


    public String getPaTypeText() {
        if ("00".equals(this.paType)){
            this.paTypeText = "主动";
        } else if ("01".equals(this.paType)){
            this.paTypeText = "被动";
        }
        return paTypeText;
    }
}
